package com.example.project.exception;

@SuppressWarnings("serial")
public final class BusinessException extends RuntimeException {
    /**
     * 错误编码
     */
    private final Integer errorCode;

    public BusinessException(String message) {
        super(message);
        this.errorCode = 0;
    }

    public BusinessException(Integer errorCode, String message) {
        super(message);
        this.errorCode = errorCode;
    }

    public Integer getErrorCode() {
        return errorCode;
    }
}
